/**
 * @Description : 路由入口
 **/

const timeout = require("connect-timeout"); //设置访问超时
const express = require("express"); //express框架
const router = express.Router(); //express框架路由

router.use("/sso", require("./sso/index")); //单点登录模块路由
router.use("/user", require("./user/index")); //用户管理模块路由
router.use("/student", require("./user/student")); //学生管理模块路由

const { test } = require("../controller/testController");
router.all("/test", timeout("5s"), test); // 测试模块

// 自定义动态路由
const { C6 } = require("../controller/C6Controller");
router.get("/C*/*", timeout("5s"), C6);

router.get("/", function (req, res, next) {
    return res.status(200).json({ code: 1, msg: "welcome" });
});

module.exports = router;
